#!/bin/bash

#设置默认访问index.php
sed -i "1i DirectoryIndex index.php index.html" /etc/apache2/apache2.conf
# 开启重写功能
a2enmod rewrite
sed -i '1a <Directory /var/www/html>' /etc/apache2/sites-available/000-default.conf
sed -i '2a AllowOverride All' /etc/apache2/sites-available/000-default.conf
sed -i '3a </Directory>' /etc/apache2/sites-available/000-default.conf

